{% extends "questions/base.html" %} {# TODO: liberate - remove questions dependency #}
{% set title = _('Flagged Content Pending Moderation') %}
{% set classes = 'flagged' %}

{% block content %}
  <div id="flagged-queue">
    <h1>{{ _('Flagged Content Pending Moderation') }}</h1>
    {% for object in objects %}
      {% if loop.first %}<ul>{% endif %}
      <li class="{{ object.content_type }}">
        <hgroup>
          <h2>{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2>
          {% if object.notes %}
            <h3 class="notes">{{ _('Other reason:') }} {{ object.notes }}</h3>
          {% endif %}
        </hgroup>
        <div class="wrap">
          {% if object.content_object %}
            {% include 'flagit/includes/flagged_%s.html' % object.content_type.model %}
          {% else %}
            <p>{{ _('{t} with id={id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}</p>
          {% endif %}
          <h3>{{ _('Update Status:') }}</h3>
          <form class="update" action="{{ url('flagit.update', object.id) }}" method="post">
            {% csrf_token %}
            <select name="status">
              <option value="">{{ _('Please select...') }}</option>
              <option value="1">{{ _('The flag is valid and I fixed the issue.') }}</option>
              <option value="2">{{ _('The flag is invalid.') }}</option>
            </select>
            <input type="submit" class="btn" value="Update" />
          </form>
        </div>
      </li>
      {% if loop.last %}</ul>{% endif %}
    {% else %}
     <p>{{ _('There is no flagged content pending moderation.') }}</p>
    {% endfor %}
    <p><a href="{{ url('users.deactivation_log') }}">{{ _('View all deactivated users') }}</a></p>
  </div>
{% endblock %}

{% block side %}
{% endblock %}
